<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script>
			function init(){
				alert("窗口加载完成");
			}
			function onDiv(){
				console.log("鼠标放在了div上！");
			}
			function gotKey(){
				console.log("输入了字符");
			}
		</script>
	</head>
	<body onload="init()">
		<input type="text" name="id" onkeydown="gotKey()"/>
		<div id="d1" style="height: 200px; width: 200px; border: 2px solid red;" onmouseover="onDiv()"></div>
	</body>
</html>
